package io.github.talelin.sleeve.common.exception;

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

import io.github.talelin.sleeve.common.api.Code;
import org.springframework.http.HttpStatus;

public class ForbiddenException extends HttpException {
    private static final long serialVersionUID = 865571132800721223L;
    protected int code;
    protected int httpCode;

    public ForbiddenException() {
        super(Code.FORBIDDEN.getCode(), Code.FORBIDDEN.getDescription());
        this.code = Code.FORBIDDEN.getCode();
        this.httpCode = HttpStatus.FORBIDDEN.value();
        super.ifDefaultMessage = true;
    }

    public ForbiddenException(int code) {
        super(code, Code.FORBIDDEN.getDescription());
        this.code = Code.FORBIDDEN.getCode();
        this.httpCode = HttpStatus.FORBIDDEN.value();
        this.code = code;
        super.ifDefaultMessage = true;
    }

    /** @deprecated */
    @Deprecated
    public ForbiddenException(String message, int code) {
        super(message, code);
        this.code = Code.FORBIDDEN.getCode();
        this.httpCode = HttpStatus.FORBIDDEN.value();
        this.code = code;
    }

    public ForbiddenException(int code, String message) {
        super(code, message);
        this.code = Code.FORBIDDEN.getCode();
        this.httpCode = HttpStatus.FORBIDDEN.value();
        this.code = code;
    }

    public ForbiddenException(String message) {
        super(message);
        this.code = Code.FORBIDDEN.getCode();
        this.httpCode = HttpStatus.FORBIDDEN.value();
    }

    public int getCode() {
        return this.code;
    }

    public int getHttpCode() {
        return this.httpCode;
    }
}
